﻿@model IEnumerable<FairyWorld.Models.MyFile>

@{
    ViewBag.Title = "SearchResult";
    Layout = "~/Views/Shared/UserLayout.cshtml";
}

<script>
    $(document).ready(function () {
        $("#filesli").attr("class", "active");
    })
</script>

<style type="text/css">
        .textstyle1
        {
            color: Red;
            font-weight: bold;
        }
        .textstyle2
        {
            color: Green;
            font-weight: bold;
        }
        .wrapper{ 
	    width:930px; 
	    background-color:#fff; 
	    position:relative;	    
	    box-shadow:1px 1px 4px rgba(0,0,0,0.4); 
	    -moz-box-shadow:1px 1px 4px rgba(0,0,0,0.4);
        -webkit-box-shadow: 1px 1px 4px rgba(0,0,0,.4);
        padding:20px;
	    }
 </style>

<h3>搜索结果</h3>
<div class="wrapper">
<table id="content" class="table table-hover" style="font-family:'Arial Rounded MT', 'Microsoft YaHei'">
    <tr>
        <th class="span1">类型</th>
        <th class="span2">名称</th>
        <th class="span2">操作</th>
        <th class="span1">大小(kb)</th>
        <th class="span1">上传时间</th>
        <th class="span1">下载次数</th>
    </tr>

@foreach (var items in Model)
{
        <tr>
                @if(items.tag == 1)
                {<td>
                    <img src="../../Content/image/icon/music.png" style="width:30px"/>
                </td>}
                @if(items.tag == 2)
                {<td>
                    <img src="../../Content/image/icon/image.png" style="width:30px"/>
                </td>}
                @if(items.tag == 3 || items.tag == 4)
                {<td>
                    <img src="../../Content/image/icon/doc.png" style="width:30px"/>
                </td>}
                <td>
                    @items.filename
                </td>
                <td><a onclick='deletef("@items.filename", 4)'>删除</a>&nbsp;|&nbsp;
                    @Html.ActionLink("下载", "Download", new { name = items.filename, tag = 4 })
                </td>
                <td>@{var fsize = items.size / 1024.0; fsize = Math.Round(fsize, 2);} @fsize</td>
                <td>@items.createTime</td>
                <td>@items.hot</td>

        </tr>
}
</table>

<div style="visibility:hidden" id="power">@ViewBag.Power</div>
<div style="visibility:hidden" id="user">@ViewBag.User.UserId</div>

</div>